﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;
using System.Globalization;

namespace BlueFlyPhone.Converters
{


        public class ConnectionStateConvertor : IValueConverter
        {
            // This converts the DateTime object to the string to display.
            public object Convert(object value, Type targetType,
                object parameter, string language)
            {

                var state = (Bluefly.ConnectionState)value;

                switch (state)
                {
                    case  Bluefly.ConnectionState.STATE_CONNECTED:
                    case Bluefly.ConnectionState.STATE_CONNECTEDANDPRESSURE:
                   
                        return "Stop";
                      
                    default :
                        return "Connect";

                
                }
            }

            // No need to implement converting back on a one-way binding 
            public object ConvertBack(object value, Type targetType,
                object parameter, string language)
            {
                throw new NotImplementedException();
            }
        }



    
}
